home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
USA Bestseller
/
USA BESTSELLER Vol 1-95 (Hepp-Computer)(1995).iso
/
e004
/
update.doc
< prev
next >
Wrap
Text File
|
1994-10-14
|
7KB
|
138 lines
l---+---L1---P-----2----+----3--T-+----4T---+----5----+----6---------7-R--+--r
LAPTOP UPDATE
PURPOSE : To update groups of files between 2 computers. Usually
a laptop and a desktop. This can be done with a link
using DOS 6 or by updating a floppy between the 2
computers.
How the system works
The system has 3 main parts that all work together.
1. LAPTOP.BTM is the main batch file. First I call a batch
file called MARK_DEL.BAT. This deletes files from the
laptop if desired and/or turns off the archive bit for
files that only need to be on laptop.
2. UPDATE.LST is a data file read and processed by UPDATE.BTM.
3. UPDATE.BTM does the actual copying of files between the two
computers.
For the purposes of this discussion, the laptop is always the
source and the desktop is always the destination. In my system I
use my desktop computer as a backup system for my laptop. Files
are copied to a directory structure on my desktop computer and
then these are backed up in turn with my other files to my tape
backup.
MARK_DEL.BTM
This is an optional file. On my computer I use a file
called MARK.DOC to copy things between files. This file may be
in several different directories but never contains anything
that needs to be saved. I erase all copies before the update.
Then I turn off the archive bit on all other files that don't
need to be transferred. Included in this zip file is a sample of
my batch file.
UPDATE.LST
This is a data file that is read and processed by
UPDATE.BTM. It takes the following form.
SourceDir DestDir FileMask Option
Example line ==> c:\qpro f:\qpro *.wq1 EX
I will discuss the option first. There are 4 possible
options.
EX is exchange. This will cause all archive files to be
copied from the source directory to the destination directory
that have the mask *.wq1. The files on the source must also be
newer than the matching file on the destination or must not
exist at all. This insures that the newest version of the file
is on both computers and that a newer file is not over written.
This is the option that you will use the most. The archive bits
will be turned off in the source directory only. Archive bit is
not needed on the destination to cause a copy and will not be
altered in the process. This is to prevent interfering with any
backup system on the main computer. Also, if the destination
directory does not exist, you will be prompted to create it.
Source => Archive & Newer => Dest
Dest => Newer => Source
UP is Update. This will do an EXchange but the files must
exist on each drive to be copied. In other words, this option
will not create any NEW files on either computer.
BU is Backup. This will copy all archive files from the
source to destination. The archive bit will then be turned off
in the source. Remember it is never altered in the destination.
No files will be copied back to source with this option. It is
exactly what it seems, a method of backing up files to my
desktop computer and then in turn being backed up to my tape
drive along with other desktop files.
APND is Append. This option I use very little but it comes
in handy. I'll see if I can explain it so it is understandable.
I'll start out with a couple of lines from the LST file:
c:\fd.mtg d:\dfd.mtg dummy APND
c:\dfd d: dfd.mtg EX
The first two parameters are not directories for this
option. They are complete path and filenames. In the above
example C:\FD.MTG is a temporary file. The lines from this file
are appended to the end of the permanent file D:\DFD.MTG. The
3rd parameter "dummy" is exactly that. This option only requires
3 parameters. The "dummy" parameter is required only to keep the
"APND" as the 4th (option) parameter. The two lines above would
perform the following actions:
1. Append C:\FD.MTG to the end of D:\DFD.MTG.
2. Delete C:\FD.MTG as this is a temporary file.
3. Line 2 is a regular EXchange line. This would exchange
the file DFD.MTG from C:\DFD directory to the root
directory of drive D, then back to C:\DFD so both
computers have the updated permanent file.
This also points out that none of the directories should
end in a backslash. Just put the drive letter and colon for the
root directory.
UPDATE.BTM
UPDATE.BTM takes one parameter. That is the filename of the
LST data file. The LST extension is not necessary. Any filename
is appropriate. The format must be correct or unpredictable
results will occur.
LAPTOP.BTM
This is the main batch file that calls the mark_del batch
file and then calls the update batch file. Mine does a couple
of other things that I will explain also.
After the two calls, I write out a list of all the files on
the laptop that are still archive files. This tells me what
files are not being backed up. Then I can either add them to
mark_del to mark and or delete or decide on a directory to back
these files up to.
YESNO.BTM
The last file in this zip really is not needed for the
update system. It has the following syntax:
YESNO Y|N TextToDisplay
The Y|N is the default answer that will be displayed
blinking in bright yellow. Every 15 seconds or so it will beep
to remind you that it is waiting for an answer. If Y or N is not
pressed after 3 beeps (about one-half minute) the default is
assumed and the batch file continues. It sets an environment
variable ANSWER to either "Y" or "N". The calling batch file can
take appropriate action based on this.